package book;

public class Book {
    private String name ;
    private String writer ;
    private int money ;
    private boolean isBorrowed ;

    public String getName() {
        return name;
    }

    public Book(String name, String writer, int money) {
        this.name = name;
        this.writer = writer;
        this.money = money;

    }

    public boolean getIsBorrowed() {
        return this.isBorrowed;
    }

    public void setIsBorrowed(boolean borrowed) {
        this.isBorrowed = borrowed;
    }

    @Override
    public String toString() {
        return "Book{" +
                "name='" + name + '\'' +
                ", writer='" + writer + '\'' +
                ", money=" + money +
                ",  " + (isBorrowed == true ? "已被借出": "未被借出")+
                '}';
    }
}
